<%@ page import="com.consorzioimpresa.resuite.domain.Contatto" %>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="springSecurityUI" />
	<g:set var="entityName"
		value="${message(code: 'contatto.label', default: 'Contatto')}" />
	<title>Lista Contatti</title>
</head>
<body>
	<div class="nav">
		<span class="menuButton">
			<g:link class="create" action="create">
					Crea Nuovo Contatto
			</g:link>
		</span>
	</div>
	<div class="body">
		<h1>
			Lista Contatti
		</h1>
		<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>
		<div class="list">
			<table>
				<thead>
					<tr>
						<g:sortableColumn property="id"
							title="${message(code: 'contatto.id.label', default: 'Id')}" />
						<g:sortableColumn property="cellulare"
							title="${message(code: 'contatto.cellulare.label', default: 'Cellulare')}" />
						<g:sortableColumn property="cognome"
							title="${message(code: 'contatto.cognome.label', default: 'Cognome')}" />
						<g:sortableColumn property="email"
							title="${message(code: 'contatto.email.label', default: 'Email')}" />
					</tr>
				</thead>
				<tbody>
					<g:each in="${contattoInstanceList}" status="i"
						var="contattoInstance">
						<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
							<td>
								<g:link action="show" id="${contattoInstance.id}">
									${fieldValue(bean: contattoInstance, field: "id")}
								</g:link>
							</td>
							<td>
								${fieldValue(bean: contattoInstance, field: "cellulare")}
							</td>
							<td>
								${fieldValue(bean: contattoInstance, field: "cognome")}
							</td>
							<td>
								${fieldValue(bean: contattoInstance, field: "email")}
							</td>
						</tr>
					</g:each>
				</tbody>
			</table>
		</div>
		<div class="paginateButtons">
			<g:paginate total="${contattoInstanceTotal}" />
		</div>
	</div>
</body>
</html>